package cn.dengta.webapp.user.entity.game;

import cn.dengta.webapp.base.entity.TimeBasedEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import me.codeplayer.util.Cmp;

@Getter
@Setter
@Accessors(chain = true)
@TableName("dt_game_activity_reward")
public class GameActivityReward extends TimeBasedEntity {
	/** 唯一索引，去从 */
	private String period;
	/** 用户id */
	private Long userId;
	/** 游戏id */
	private Long gameId;
	/** 奖励金币数 */
	private Integer golds;
	/** 排名 */
	private Integer ranking;
	/** 0=待领取；1=已领取 */
	private Integer status;

	/** 可领取 */
	public boolean canReceive(){
		return Cmp.eq(this.status, 0);
	}
}
